package com.mininglamp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

import lombok.extern.java.Log;
import lombok.extern.slf4j.Slf4j;

@SpringBootApplication
@Slf4j
@Log
@EnableScheduling
@EnableCaching
public class WetchatsApiApplication {


	@Autowired
	private RestTemplateBuilder builder;

	public static void main(String[] args) throws Exception {
		SpringApplication.run(WetchatsApiApplication.class, args);
		log.info("server is started!!!");
	}

	@Bean
	public RestTemplate restTemplate() {
		return builder.build();
	}

	
}
